<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="mobileOptimized" content="240" />
<meta name="format-detection" content="telephone=no" />
<title>Insert title here</title>
</head>
<script>
	function RequestPermission(callback) {
		window.webkitNotifications.requestPermission(callback);
	}

	function showNotification() {
		if (window.webkitNotifications.checkPermission() > 0) {
			RequestPermission(showNotification);
		} else {
			window.webkitNotifications.createNotification(
					"http://tp3.sinaimg.cn/1883935250/50/0/1", "这里写标题",
					"其实以后这个程序会被广泛使用于邮箱和网页游戏中。").show();
		}
	}
</script>
</head>
<body>
	<button onclick="showNotification()">Show Notification</button>
</body>
</html>